/**
 * 下载触发器
 * @param blob - 资源
 * @param name - 生成的文件名
 */
export function downloadSource(blob: Blob | MediaSource, name: string) {
  const link = document.createElement('a');
  link.href = window.URL.createObjectURL(blob);
  link.download = name;
  link.click();
  link.remove();
}
